/*
 Navicat Premium Data Transfer

 Source Server         : 127.0.0.1
 Source Server Type    : MySQL
 Source Server Version : 80012
 Source Host           : 127.0.0.1:3306
 Source Schema         : base

 Target Server Type    : MySQL
 Target Server Version : 80012
 File Encoding         : 65001

 Date: 17/12/2018 01:40:02
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for oauth_access_token
-- ----------------------------
DROP TABLE IF EXISTS `oauth_access_token`;
CREATE TABLE `oauth_access_token` (
  `token_id` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `token` blob,
  `authentication_id` varchar(250) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
  `user_name` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `client_id` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `authentication` blob,
  `refresh_token` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  PRIMARY KEY (`authentication_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of oauth_access_token
-- ----------------------------
BEGIN;
INSERT INTO `oauth_access_token` VALUES ('028736a97b0f200366f6acb82e326e93', 0xACED0005737200436F72672E737072696E676672616D65776F726B2E73656375726974792E6F61757468322E636F6D6D6F6E2E44656661756C744F4175746832416363657373546F6B656E0CB29E361B24FACE0200064C00156164646974696F6E616C496E666F726D6174696F6E74000F4C6A6176612F7574696C2F4D61703B4C000A65787069726174696F6E7400104C6A6176612F7574696C2F446174653B4C000C72656672657368546F6B656E74003F4C6F72672F737072696E676672616D65776F726B2F73656375726974792F6F61757468322F636F6D6D6F6E2F4F417574683252656672657368546F6B656E3B4C000573636F706574000F4C6A6176612F7574696C2F5365743B4C0009746F6B656E547970657400124C6A6176612F6C616E672F537472696E673B4C000576616C756571007E000578707372001E6A6176612E7574696C2E436F6C6C656374696F6E7324456D7074794D6170593614855ADCE7D002000078707372000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001678955948E787372004C6F72672E737072696E676672616D65776F726B2E73656375726974792E6F61757468322E636F6D6D6F6E2E44656661756C744578706972696E674F417574683252656672657368546F6B656E2FDF47639DD0C9B70200014C000A65787069726174696F6E71007E0002787200446F72672E737072696E676672616D65776F726B2E73656375726974792E6F61757468322E636F6D6D6F6E2E44656661756C744F417574683252656672657368546F6B656E73E10E0A6354D45E0200014C000576616C756571007E0005787074002466373432373866392D613561662D346661622D613163362D3761313733616235383531367371007E00097708000001681EAE008978737200256A6176612E7574696C2E436F6C6C656374696F6E7324556E6D6F6469666961626C65536574801D92D18F9B80550200007872002C6A6176612E7574696C2E436F6C6C656374696F6E7324556E6D6F6469666961626C65436F6C6C656374696F6E19420080CB5EF71E0200014C0001637400164C6A6176612F7574696C2F436F6C6C656374696F6E3B7870737200176A6176612E7574696C2E4C696E6B656448617368536574D86CD75A95DD2A1E020000787200116A6176612E7574696C2E48617368536574BA44859596B8B7340300007870770C000000023F40000000000001740003616C6C7874000662656172657274002435626334363832362D303239372D346135642D383562622D376332623436306338633364, '227ccfa0102c5cbefcc06a8b99bc12fa', 'admin', 'client', 0xACED0005737200416F72672E737072696E676672616D65776F726B2E73656375726974792E6F61757468322E70726F76696465722E4F417574683241757468656E7469636174696F6EBD400B02166252130200024C000D73746F7265645265717565737474003C4C6F72672F737072696E676672616D65776F726B2F73656375726974792F6F61757468322F70726F76696465722F4F4175746832526571756573743B4C00127573657241757468656E7469636174696F6E7400324C6F72672F737072696E676672616D65776F726B2F73656375726974792F636F72652F41757468656E7469636174696F6E3B787200476F72672E737072696E676672616D65776F726B2E73656375726974792E61757468656E7469636174696F6E2E416273747261637441757468656E7469636174696F6E546F6B656ED3AA287E6E47640E0200035A000D61757468656E746963617465644C000B617574686F7269746965737400164C6A6176612F7574696C2F436F6C6C656374696F6E3B4C000764657461696C737400124C6A6176612F6C616E672F4F626A6563743B787000737200266A6176612E7574696C2E436F6C6C656374696F6E7324556E6D6F6469666961626C654C697374FC0F2531B5EC8E100200014C00046C6973747400104C6A6176612F7574696C2F4C6973743B7872002C6A6176612E7574696C2E436F6C6C656374696F6E7324556E6D6F6469666961626C65436F6C6C656374696F6E19420080CB5EF71E0200014C00016371007E00047870737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000002770400000002737200426F72672E737072696E676672616D65776F726B2E73656375726974792E636F72652E617574686F726974792E53696D706C654772616E746564417574686F7269747900000000000001F40200014C0004726F6C657400124C6A6176612F6C616E672F537472696E673B787074000A524F4C455F41444D494E7371007E000D740009524F4C455F555345527871007E000C707372003A6F72672E737072696E676672616D65776F726B2E73656375726974792E6F61757468322E70726F76696465722E4F41757468325265717565737400000000000000010200075A0008617070726F7665644C000B617574686F72697469657371007E00044C000A657874656E73696F6E7374000F4C6A6176612F7574696C2F4D61703B4C000B726564697265637455726971007E000E4C00077265667265736874003B4C6F72672F737072696E676672616D65776F726B2F73656375726974792F6F61757468322F70726F76696465722F546F6B656E526571756573743B4C000B7265736F7572636549647374000F4C6A6176612F7574696C2F5365743B4C000D726573706F6E7365547970657371007E0016787200386F72672E737072696E676672616D65776F726B2E73656375726974792E6F61757468322E70726F76696465722E426173655265717565737436287A3EA37169BD0200034C0008636C69656E74496471007E000E4C001172657175657374506172616D657465727371007E00144C000573636F706571007E00167870740006636C69656E74737200256A6176612E7574696C2E436F6C6C656374696F6E7324556E6D6F6469666961626C654D6170F1A5A8FE74F507420200014C00016D71007E00147870737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F400000000000067708000000080000000374000A6772616E745F7479706574000870617373776F7264740008757365726E616D6574000561646D696E74000573636F7065740003616C6C78737200256A6176612E7574696C2E436F6C6C656374696F6E7324556E6D6F6469666961626C65536574801D92D18F9B80550200007871007E0009737200176A6176612E7574696C2E4C696E6B656448617368536574D86CD75A95DD2A1E020000787200116A6176612E7574696C2E48617368536574BA44859596B8B7340300007870770C000000103F4000000000000171007E002378017371007E0027770C000000103F40000000000000787371007E001C3F40000000000000770800000010000000007870707371007E0027770C000000103F40000000000000787371007E0027770C000000103F40000000000000787372004F6F72672E737072696E676672616D65776F726B2E73656375726974792E61757468656E7469636174696F6E2E557365726E616D6550617373776F726441757468656E7469636174696F6E546F6B656E00000000000001F40200024C000B63726564656E7469616C7371007E00054C00097072696E636970616C71007E00057871007E0003017371007E00077371007E000B0000000277040000000271007E000F71007E00117871007E0030737200176A6176612E7574696C2E4C696E6B6564486173684D617034C04E5C106CC0FB0200015A000B6163636573734F726465727871007E001C3F400000000000067708000000080000000371007E001E71007E001F71007E002071007E002171007E002271007E00237800707372002C636F6D2E6D6F64756C65732E75706D732E636F6D6D6F6E2E7574696C2E5573657244657461696C73496D706C00000000000000010200054C000870617373776F726471007E000E4C0008726F6C654C69737471007E00084C000673746174757371007E000E4C00067573657249647400134C6A6176612F6C616E672F496E74656765723B4C0008757365726E616D6571007E000E787074003C24326124313024766735514E4868436B6E417165767839764D32733565736C6C4A457A462F706138565A587446594868684F68556343772F475779537371007E000B0000000177040000000173720015636F6D2E636F6D6D6F6E2E766F2E537973526F6C6500000000000000010200074C000A63726561746554696D657400104C6A6176612F7574696C2F446174653B4C000764656C466C616771007E000E4C0008726F6C65436F646571007E000E4C0008726F6C654465736371007E000E4C0006726F6C65496471007E00344C0008726F6C654E616D6571007E000E4C000A75706461746554696D6571007E003978707372000E6A6176612E7574696C2E44617465686A81014B597419030000787077080000015F67180F98787071007E001074000FE8B685E7BAA7E7AEA1E79086E59198737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000174000561646D696E7371007E003B770800000162EB704FC878787400013071007E004074000561646D696E, 'f8d24bbaf2d0e820389a75de02f73b70');
COMMIT;

-- ----------------------------
-- Table structure for oauth_client_details
-- ----------------------------
DROP TABLE IF EXISTS `oauth_client_details`;
CREATE TABLE `oauth_client_details` (
  `client_id` varchar(256) NOT NULL,
  `resource_ids` varchar(256) DEFAULT NULL,
  `client_secret` varchar(256) DEFAULT NULL,
  `scope` varchar(256) DEFAULT NULL,
  `authorized_grant_types` varchar(256) DEFAULT NULL,
  `web_server_redirect_uri` varchar(256) DEFAULT NULL,
  `authorities` varchar(256) DEFAULT NULL,
  `access_token_validity` int(11) DEFAULT NULL,
  `refresh_token_validity` int(11) DEFAULT NULL,
  `additional_information` varchar(4096) DEFAULT NULL,
  `autoapprove` varchar(256) DEFAULT NULL,
  PRIMARY KEY (`client_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of oauth_client_details
-- ----------------------------
BEGIN;
INSERT INTO `oauth_client_details` VALUES ('base', NULL, '$2a$10$n5b/J7KbWnSyiQ0bvXabAOwQ/ni4xwVaOrwIYnk6BkWJkDg9SlJEu', 'all', 'password,authorization_code,refresh_token,implicit,client_credentials', NULL, NULL, NULL, NULL, NULL, 'true');
COMMIT;

-- ----------------------------
-- Table structure for oauth_refresh_token
-- ----------------------------
DROP TABLE IF EXISTS `oauth_refresh_token`;
CREATE TABLE `oauth_refresh_token` (
  `token_id` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
  `token` blob,
  `authentication` blob
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

-- ----------------------------
-- Records of oauth_refresh_token
-- ----------------------------
BEGIN;
INSERT INTO `oauth_refresh_token` VALUES ('f8d24bbaf2d0e820389a75de02f73b70', 0xACED00057372004C6F72672E737072696E676672616D65776F726B2E73656375726974792E6F61757468322E636F6D6D6F6E2E44656661756C744578706972696E674F417574683252656672657368546F6B656E2FDF47639DD0C9B70200014C000A65787069726174696F6E7400104C6A6176612F7574696C2F446174653B787200446F72672E737072696E676672616D65776F726B2E73656375726974792E6F61757468322E636F6D6D6F6E2E44656661756C744F417574683252656672657368546F6B656E73E10E0A6354D45E0200014C000576616C75657400124C6A6176612F6C616E672F537472696E673B787074002466373432373866392D613561662D346661622D613163362D3761313733616235383531367372000E6A6176612E7574696C2E44617465686A81014B59741903000078707708000001681EAE008978, 0xACED0005737200416F72672E737072696E676672616D65776F726B2E73656375726974792E6F61757468322E70726F76696465722E4F417574683241757468656E7469636174696F6EBD400B02166252130200024C000D73746F7265645265717565737474003C4C6F72672F737072696E676672616D65776F726B2F73656375726974792F6F61757468322F70726F76696465722F4F4175746832526571756573743B4C00127573657241757468656E7469636174696F6E7400324C6F72672F737072696E676672616D65776F726B2F73656375726974792F636F72652F41757468656E7469636174696F6E3B787200476F72672E737072696E676672616D65776F726B2E73656375726974792E61757468656E7469636174696F6E2E416273747261637441757468656E7469636174696F6E546F6B656ED3AA287E6E47640E0200035A000D61757468656E746963617465644C000B617574686F7269746965737400164C6A6176612F7574696C2F436F6C6C656374696F6E3B4C000764657461696C737400124C6A6176612F6C616E672F4F626A6563743B787000737200266A6176612E7574696C2E436F6C6C656374696F6E7324556E6D6F6469666961626C654C697374FC0F2531B5EC8E100200014C00046C6973747400104C6A6176612F7574696C2F4C6973743B7872002C6A6176612E7574696C2E436F6C6C656374696F6E7324556E6D6F6469666961626C65436F6C6C656374696F6E19420080CB5EF71E0200014C00016371007E00047870737200136A6176612E7574696C2E41727261794C6973747881D21D99C7619D03000149000473697A65787000000002770400000002737200426F72672E737072696E676672616D65776F726B2E73656375726974792E636F72652E617574686F726974792E53696D706C654772616E746564417574686F7269747900000000000001F40200014C0004726F6C657400124C6A6176612F6C616E672F537472696E673B787074000A524F4C455F41444D494E7371007E000D740009524F4C455F555345527871007E000C707372003A6F72672E737072696E676672616D65776F726B2E73656375726974792E6F61757468322E70726F76696465722E4F41757468325265717565737400000000000000010200075A0008617070726F7665644C000B617574686F72697469657371007E00044C000A657874656E73696F6E7374000F4C6A6176612F7574696C2F4D61703B4C000B726564697265637455726971007E000E4C00077265667265736874003B4C6F72672F737072696E676672616D65776F726B2F73656375726974792F6F61757468322F70726F76696465722F546F6B656E526571756573743B4C000B7265736F7572636549647374000F4C6A6176612F7574696C2F5365743B4C000D726573706F6E7365547970657371007E0016787200386F72672E737072696E676672616D65776F726B2E73656375726974792E6F61757468322E70726F76696465722E426173655265717565737436287A3EA37169BD0200034C0008636C69656E74496471007E000E4C001172657175657374506172616D657465727371007E00144C000573636F706571007E00167870740006636C69656E74737200256A6176612E7574696C2E436F6C6C656374696F6E7324556E6D6F6469666961626C654D6170F1A5A8FE74F507420200014C00016D71007E00147870737200116A6176612E7574696C2E486173684D61700507DAC1C31660D103000246000A6C6F6164466163746F724900097468726573686F6C6478703F400000000000067708000000080000000374000A6772616E745F7479706574000870617373776F7264740008757365726E616D6574000561646D696E74000573636F7065740003616C6C78737200256A6176612E7574696C2E436F6C6C656374696F6E7324556E6D6F6469666961626C65536574801D92D18F9B80550200007871007E0009737200176A6176612E7574696C2E4C696E6B656448617368536574D86CD75A95DD2A1E020000787200116A6176612E7574696C2E48617368536574BA44859596B8B7340300007870770C000000103F4000000000000171007E002378017371007E0027770C000000103F40000000000000787371007E001C3F40000000000000770800000010000000007870707371007E0027770C000000103F40000000000000787371007E0027770C000000103F40000000000000787372004F6F72672E737072696E676672616D65776F726B2E73656375726974792E61757468656E7469636174696F6E2E557365726E616D6550617373776F726441757468656E7469636174696F6E546F6B656E00000000000001F40200024C000B63726564656E7469616C7371007E00054C00097072696E636970616C71007E00057871007E0003017371007E00077371007E000B0000000277040000000271007E000F71007E00117871007E0030737200176A6176612E7574696C2E4C696E6B6564486173684D617034C04E5C106CC0FB0200015A000B6163636573734F726465727871007E001C3F400000000000067708000000080000000371007E001E71007E001F71007E002071007E002171007E002271007E00237800707372002C636F6D2E6D6F64756C65732E75706D732E636F6D6D6F6E2E7574696C2E5573657244657461696C73496D706C00000000000000010200054C000870617373776F726471007E000E4C0008726F6C654C69737471007E00084C000673746174757371007E000E4C00067573657249647400134C6A6176612F6C616E672F496E74656765723B4C0008757365726E616D6571007E000E787074003C24326124313024766735514E4868436B6E417165767839764D32733565736C6C4A457A462F706138565A587446594868684F68556343772F475779537371007E000B0000000177040000000173720015636F6D2E636F6D6D6F6E2E766F2E537973526F6C6500000000000000010200074C000A63726561746554696D657400104C6A6176612F7574696C2F446174653B4C000764656C466C616771007E000E4C0008726F6C65436F646571007E000E4C0008726F6C654465736371007E000E4C0006726F6C65496471007E00344C0008726F6C654E616D6571007E000E4C000A75706461746554696D6571007E003978707372000E6A6176612E7574696C2E44617465686A81014B597419030000787077080000015F67180F98787071007E001074000FE8B685E7BAA7E7AEA1E79086E59198737200116A6176612E6C616E672E496E746567657212E2A0A4F781873802000149000576616C7565787200106A6176612E6C616E672E4E756D62657286AC951D0B94E08B02000078700000000174000561646D696E7371007E003B770800000162EB704FC878787400013071007E004074000561646D696E);
COMMIT;

-- ----------------------------
-- Table structure for quartz_task
-- ----------------------------
DROP TABLE IF EXISTS `quartz_task`;
CREATE TABLE `quartz_task` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `name` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '任务名称',
  `bean_id` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '任务执行BEAN',
  `params` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT '任务运行参数',
  `cron_expression` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT 'cron表达式',
  `state` varchar(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '任务状态',
  `memo` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '备注',
  `create_user_id` int(11) DEFAULT NULL COMMENT '创建人',
  `update_user_id` int(11) DEFAULT NULL COMMENT '修改人',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `del_flag` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'NOR' COMMENT 'NOR：正常， DEL：删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=COMPACT COMMENT='任务调度资源';

-- ----------------------------
-- Table structure for quartz_task_log
-- ----------------------------
DROP TABLE IF EXISTS `quartz_task_log`;
CREATE TABLE `quartz_task_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `quartz_id` int(11) DEFAULT NULL COMMENT '任务ID',
  `bean_id` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '任务执行BEAN',
  `params` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT '任务运行参数',
  `state` varchar(16) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '执行状态',
  `error` text CHARACTER SET utf8 COLLATE utf8_bin COMMENT '失败信息',
  `times` int(11) DEFAULT NULL COMMENT '耗时(单位：毫秒)',
  `create_date` datetime DEFAULT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `job_id` (`quartz_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=COMPACT COMMENT='任务调度运行日志';

-- ----------------------------
-- Table structure for sys_attachment_info
-- ----------------------------
DROP TABLE IF EXISTS `sys_attachment_info`;
CREATE TABLE `sys_attachment_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `biz_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '业务ID',
  `biz_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '业务类型',
  `file_name` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '文件名称',
  `file_path` varchar(256) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '文件路径',
  `memo` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '备注',
  `create_user_id` int(11) DEFAULT NULL COMMENT '创建人',
  `update_user_id` int(11) DEFAULT NULL COMMENT '修改人',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `del_flag` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'NOR' COMMENT 'NOR：正常， DEL：删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin ROW_FORMAT=COMPACT COMMENT='系统附件表';

-- ----------------------------
-- Table structure for sys_dept
-- ----------------------------
DROP TABLE IF EXISTS `sys_dept`;
CREATE TABLE `sys_dept` (
  `id` int(20) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) DEFAULT NULL,
  `code` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '机构编码',
  `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '机构名称',
  `name_py` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '机构名称拼音',
  `level` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '级别',
  `type` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '机构类型',
  `status` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '状态',
  `sort` int(16) DEFAULT NULL COMMENT '排序号',
  `memo` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '备注',
  `create_user_id` int(11) DEFAULT NULL COMMENT '创建人',
  `update_user_id` int(11) DEFAULT NULL COMMENT '修改人',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `del_flag` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'NOR' COMMENT 'NOR：正常， DEL：删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='部门管理';

-- ----------------------------
-- Records of sys_dept
-- ----------------------------
BEGIN;
INSERT INTO `sys_dept` VALUES (1, -1, NULL, '听游运营平台', NULL, NULL, 'SYSTEM', 'VALID', 1, '111', NULL, NULL, '2018-12-13 21:21:27', '2018-12-16 22:50:05', 'NOR');
INSERT INTO `sys_dept` VALUES (2, 1, NULL, '技术部', NULL, NULL, 'SYSTEM', 'VALID', 1, NULL, NULL, NULL, '2018-12-13 21:21:27', '2018-12-16 11:31:18', 'NOR');
INSERT INTO `sys_dept` VALUES (3, 1, NULL, '运营部', NULL, NULL, 'SYSTEM', 'VALID', 2, NULL, NULL, NULL, '2018-12-13 21:21:27', '2018-12-16 11:31:34', 'NOR');
INSERT INTO `sys_dept` VALUES (10, 1, NULL, 'www', NULL, NULL, 'SYSTEM', 'VALID', 1, 'www', NULL, NULL, NULL, NULL, 'NOR');
COMMIT;

-- ----------------------------
-- Table structure for sys_dict
-- ----------------------------
DROP TABLE IF EXISTS `sys_dict`;
CREATE TABLE `sys_dict` (
  `id` int(64) NOT NULL AUTO_INCREMENT COMMENT '编号',
  `value` varchar(100) NOT NULL COMMENT '数据值',
  `label` varchar(100) NOT NULL COMMENT '标签名',
  `type` varchar(100) NOT NULL COMMENT '类型',
  `status` varchar(32) DEFAULT NULL COMMENT '状态',
  `sort` decimal(10,0) NOT NULL COMMENT '排序（升序）',
  `memo` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '备注',
  `create_user_id` int(11) DEFAULT NULL COMMENT '创建人',
  `update_user_id` int(11) DEFAULT NULL COMMENT '修改人',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `del_flag` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'NOR' COMMENT 'NOR：正常， DEL：删除',
  PRIMARY KEY (`id`) USING BTREE,
  KEY `sys_dict_value` (`value`),
  KEY `sys_dict_label` (`label`),
  KEY `sys_dict_del_flag` (`del_flag`(1))
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='字典表';

-- ----------------------------
-- Records of sys_dict
-- ----------------------------
BEGIN;
INSERT INTO `sys_dict` VALUES (1, 'SYSTEM', '系统', 'TYPE', 'VALID', 1, '通用类型', NULL, NULL, '2018-12-13 21:15:07', '2018-12-16 23:41:40', 'NOR');
INSERT INTO `sys_dict` VALUES (2, 'BIZ', '业务', 'TYPE', 'VALID', 2, '通用类型', NULL, NULL, '2018-12-13 21:15:07', '2018-12-16 23:41:39', 'NOR');
INSERT INTO `sys_dict` VALUES (3, 'VALID', '有效', 'STATUS', 'VALID', 1, '通用状态', NULL, NULL, '2018-12-16 22:55:04', '2018-12-16 23:41:26', 'NOR');
INSERT INTO `sys_dict` VALUES (4, 'INVALID', '无效', 'STATUS', 'VALID', 2, '通用状态', NULL, NULL, '2018-12-16 22:55:34', '2018-12-16 23:41:29', 'NOR');
INSERT INTO `sys_dict` VALUES (5, 'SCOPE_ALL', '所有数据', 'DATA_SCOPE', 'VALID', 1, '数据范围', NULL, NULL, '2018-12-16 23:39:46', NULL, 'NOR');
INSERT INTO `sys_dict` VALUES (6, 'SCOPE_DEPT_ALL', '所在部门及以下数据', 'DATA_SCOPE', 'VALID', 2, '数据范围', NULL, NULL, '2018-12-16 23:39:46', '2018-12-16 23:43:53', 'NOR');
INSERT INTO `sys_dict` VALUES (7, 'SCOPE_DEPT', '所在部门数据', 'DATA_SCOPE', 'VALID', 3, '数据范围', NULL, NULL, '2018-12-16 23:39:46', '2018-12-16 23:43:48', 'NOR');
INSERT INTO `sys_dict` VALUES (8, 'SCOPE_SELF', '仅本人数据', 'DATA_SCOPE', 'VALID', 4, '数据范围', NULL, NULL, '2018-12-16 23:39:46', '2018-12-16 23:43:26', 'NOR');
INSERT INTO `sys_dict` VALUES (9, 'SCOPE_DETAIL', '按明细设置', 'DATA_SCOPE', 'VALID', 5, '数据范围', NULL, NULL, '2018-12-16 23:39:46', '2018-12-16 23:43:18', 'NOR');
COMMIT;

-- ----------------------------
-- Table structure for sys_log
-- ----------------------------
DROP TABLE IF EXISTS `sys_log`;
CREATE TABLE `sys_log` (
  `id` int(64) NOT NULL AUTO_INCREMENT COMMENT '编号',
  `description` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '操作描述',
  `username` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '操作用户',
  `start_time` bigint(20) DEFAULT NULL COMMENT '操作时间',
  `base_path` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '根路径',
  `uri` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'URI',
  `url` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'URL',
  `method` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '请求类型',
  `parameter` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '参数',
  `user_agent` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '用户标识',
  `ip` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT 'IP地址',
  `result` mediumtext CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '结果',
  `permissions` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '权限值',
  `state` varchar(16) DEFAULT NULL COMMENT '状态',
  `spend_time` int(11) DEFAULT NULL COMMENT '消耗时间',
  `memo` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '备注',
  `create_user_id` int(11) DEFAULT NULL COMMENT '创建人',
  `update_user_id` int(11) DEFAULT NULL COMMENT '修改人',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `del_flag` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'NOR' COMMENT 'NOR：正常， DEL：删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='操作日志';

-- ----------------------------
-- Table structure for sys_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_menu`;
CREATE TABLE `sys_menu` (
  `id` int(11) NOT NULL COMMENT '菜单ID',
  `parent_id` int(11) DEFAULT NULL COMMENT '父菜单ID',
  `name` varchar(32) NOT NULL COMMENT '菜单名称',
  `locales_key` varchar(64) DEFAULT NULL COMMENT '多语言KEY',
  `path` varchar(128) DEFAULT NULL COMMENT '前端URL',
  `url` varchar(128) DEFAULT NULL COMMENT '请求链接',
  `icon` varchar(32) DEFAULT NULL COMMENT '图标',
  `status` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '状态',
  `sort` int(11) DEFAULT '1' COMMENT '排序值',
  `type` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '菜单类型',
  `permission` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '菜单权限标识',
  `memo` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '备注',
  `create_user_id` int(11) DEFAULT NULL COMMENT '创建人',
  `update_user_id` int(11) DEFAULT NULL COMMENT '修改人',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `del_flag` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'NOR' COMMENT 'NOR：正常， DEL：删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='菜单权限表';

-- ----------------------------
-- Records of sys_menu
-- ----------------------------
BEGIN;
INSERT INTO `sys_menu` VALUES (1, -1, '系统管理', NULL, '/system', NULL, 'setting', NULL, 1, 'MENU', NULL, NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-16 21:53:09', 'NOR');
INSERT INTO `sys_menu` VALUES (2, 1, '用户管理', NULL, '/system/user', '/sys/user/**', '', NULL, 3, 'MENU', NULL, NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-16 21:59:38', 'NOR');
INSERT INTO `sys_menu` VALUES (3, 1, '菜单管理', NULL, '/system/menu', '/sys/menu/**', '', NULL, 5, 'MENU', NULL, NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-16 21:59:51', 'NOR');
INSERT INTO `sys_menu` VALUES (4, 1, '角色管理', NULL, '/system/role', '/sys/role/**', '', NULL, 2, 'MENU', NULL, NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-16 21:59:29', 'NOR');
INSERT INTO `sys_menu` VALUES (5, 1, '日志管理', NULL, '/system/log', '/sys/log/**', '', NULL, 6, 'MENU', NULL, NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-16 21:59:48', 'NOR');
INSERT INTO `sys_menu` VALUES (6, 1, '字典管理', NULL, '/system/dict', '/sys/dict/**', '', NULL, 4, 'MENU', NULL, NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-16 21:59:42', 'NOR');
INSERT INTO `sys_menu` VALUES (7, 1, '部门管理', NULL, '/system/dept', '/sys/dept/**', '', NULL, 1, 'MENU', NULL, NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-16 21:59:13', 'NOR');
INSERT INTO `sys_menu` VALUES (21, 2, '用户查看', NULL, NULL, '/admin/user/**', NULL, NULL, NULL, 'BUTTON', '', NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (22, 2, '用户新增', NULL, NULL, '/admin/user/*', NULL, NULL, NULL, 'BUTTON', 'sys_user_add', NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (23, 2, '用户修改', NULL, NULL, '/admin/user/**', NULL, NULL, NULL, 'BUTTON', 'sys_user_upd', NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (24, 2, '用户删除', NULL, NULL, '/admin/user/*', NULL, NULL, NULL, 'BUTTON', 'sys_user_del', NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (31, 3, '菜单查看', NULL, NULL, '/admin/menu/**', NULL, NULL, NULL, 'BUTTON', NULL, NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (32, 3, '菜单新增', NULL, NULL, '/admin/menu/*', NULL, NULL, NULL, 'BUTTON', 'sys_menu_add', NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (33, 3, '菜单修改', NULL, NULL, '/admin/menu/*', NULL, NULL, NULL, 'BUTTON', 'sys_menu_edit', NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (34, 3, '菜单删除', NULL, NULL, '/admin/menu/*', NULL, NULL, NULL, 'BUTTON', 'sys_menu_del', NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (41, 4, '角色查看', NULL, NULL, '/admin/role/**', NULL, NULL, NULL, 'BUTTON', NULL, NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (42, 4, '角色新增', NULL, NULL, '/admin/role/*', NULL, NULL, NULL, 'BUTTON', 'sys_role_add', NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (43, 4, '角色修改', NULL, NULL, '/admin/role/*', NULL, NULL, NULL, 'BUTTON', 'sys_role_edit', NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (44, 4, '角色删除', NULL, NULL, '/admin/role/*', NULL, NULL, NULL, 'BUTTON', 'sys_role_del', NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (45, 4, '分配权限', NULL, NULL, '/admin/role/*', NULL, NULL, NULL, 'BUTTON', 'sys_role_perm', NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (51, 5, '日志查看', NULL, NULL, '/admin/log/**', NULL, NULL, NULL, 'BUTTON', NULL, NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (52, 5, '日志删除', NULL, NULL, '/admin/log/*', NULL, NULL, NULL, 'BUTTON', 'sys_log_del', NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (61, 6, '字典查看', NULL, NULL, '/admin/dict/**', NULL, NULL, NULL, 'BUTTON', NULL, NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (62, 6, '字典删除', NULL, NULL, '/admin/dict/**', NULL, NULL, NULL, 'BUTTON', 'sys_dict_del', NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (63, 6, '字典新增', NULL, NULL, '/admin/dict/**', NULL, NULL, NULL, 'BUTTON', 'sys_dict_add', NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (64, 6, '字典修改', NULL, NULL, '/admin/dict/**', NULL, NULL, NULL, 'BUTTON', 'sys_dict_upd', NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (71, 7, '部门查看', NULL, NULL, '/admin/dept/**', NULL, NULL, NULL, 'BUTTON', '', NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (72, 7, '部门新增', NULL, NULL, '/admin/dept/**', NULL, NULL, NULL, 'BUTTON', 'sys_dept_add', NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (73, 7, '部门修改', NULL, NULL, '/admin/dept/**', NULL, NULL, NULL, 'BUTTON', 'sys_dept_edit', NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
INSERT INTO `sys_menu` VALUES (74, 7, '部门删除', NULL, NULL, '/admin/dept/**', NULL, NULL, NULL, 'BUTTON', 'sys_dept_del', NULL, NULL, NULL, '2018-12-13 21:22:06', '2018-12-14 22:44:47', 'NOR');
COMMIT;

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号',
  `code` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '角色编码',
  `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '角色名称',
  `type` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '角色类型',
  `status` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '状态',
  `data_scope` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '数据范围',
  `memo` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '备注',
  `create_user_id` int(11) DEFAULT NULL COMMENT '创建人',
  `update_user_id` int(11) DEFAULT NULL COMMENT '修改人',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `del_flag` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'NOR' COMMENT 'NOR：正常， DEL：删除',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='系统角色';

-- ----------------------------
-- Records of sys_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_role` VALUES (1, 'ROLE_ADMIN', '超级管理员', '1', 'VALID', 'SCOPE_ALL', NULL, NULL, NULL, '2018-12-13 21:22:24', '2018-12-16 23:47:10', 'NOR');
INSERT INTO `sys_role` VALUES (2, 'ROLE_BIZ', '业务平台管理员', NULL, 'VALID', 'SCOPE_DEPT_ALL', '', NULL, NULL, '2018-12-13 21:22:24', '2018-12-17 00:39:52', 'NOR');
INSERT INTO `sys_role` VALUES (3, 'ROLE_CHANNEL', '渠道管理员', NULL, 'VALID', 'SCOPE_DEPT_ALL', NULL, NULL, NULL, '2018-12-13 21:22:24', '2018-12-17 00:39:53', 'NOR');
INSERT INTO `sys_role` VALUES (4, 'ROLE_ORDINARY', '普通用户', NULL, 'VALID', 'SCOPE_DETAIL', NULL, NULL, NULL, NULL, NULL, 'NOR');
COMMIT;

-- ----------------------------
-- Table structure for sys_role_dept
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_dept`;
CREATE TABLE `sys_role_dept` (
  `role_id` int(11) NOT NULL COMMENT '角色ID',
  `dept_id` int(11) NOT NULL COMMENT '部门ID',
  PRIMARY KEY (`role_id`,`dept_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Table structure for sys_role_menu
-- ----------------------------
DROP TABLE IF EXISTS `sys_role_menu`;
CREATE TABLE `sys_role_menu` (
  `role_id` int(11) NOT NULL COMMENT '角色ID',
  `menu_id` int(11) NOT NULL COMMENT '菜单ID',
  PRIMARY KEY (`role_id`,`menu_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='角色菜单表';

-- ----------------------------
-- Records of sys_role_menu
-- ----------------------------
BEGIN;
INSERT INTO `sys_role_menu` VALUES (1, 1);
INSERT INTO `sys_role_menu` VALUES (1, 2);
INSERT INTO `sys_role_menu` VALUES (1, 3);
INSERT INTO `sys_role_menu` VALUES (1, 4);
INSERT INTO `sys_role_menu` VALUES (1, 5);
INSERT INTO `sys_role_menu` VALUES (1, 6);
INSERT INTO `sys_role_menu` VALUES (1, 7);
INSERT INTO `sys_role_menu` VALUES (1, 8);
INSERT INTO `sys_role_menu` VALUES (1, 9);
INSERT INTO `sys_role_menu` VALUES (1, 10);
INSERT INTO `sys_role_menu` VALUES (1, 11);
INSERT INTO `sys_role_menu` VALUES (1, 12);
INSERT INTO `sys_role_menu` VALUES (1, 13);
INSERT INTO `sys_role_menu` VALUES (1, 14);
INSERT INTO `sys_role_menu` VALUES (1, 15);
INSERT INTO `sys_role_menu` VALUES (1, 21);
INSERT INTO `sys_role_menu` VALUES (1, 22);
INSERT INTO `sys_role_menu` VALUES (1, 23);
INSERT INTO `sys_role_menu` VALUES (1, 24);
INSERT INTO `sys_role_menu` VALUES (1, 31);
INSERT INTO `sys_role_menu` VALUES (1, 32);
INSERT INTO `sys_role_menu` VALUES (1, 33);
INSERT INTO `sys_role_menu` VALUES (1, 34);
INSERT INTO `sys_role_menu` VALUES (1, 41);
INSERT INTO `sys_role_menu` VALUES (1, 42);
INSERT INTO `sys_role_menu` VALUES (1, 43);
INSERT INTO `sys_role_menu` VALUES (1, 44);
INSERT INTO `sys_role_menu` VALUES (1, 45);
INSERT INTO `sys_role_menu` VALUES (1, 51);
INSERT INTO `sys_role_menu` VALUES (1, 52);
INSERT INTO `sys_role_menu` VALUES (1, 61);
INSERT INTO `sys_role_menu` VALUES (1, 62);
INSERT INTO `sys_role_menu` VALUES (1, 63);
INSERT INTO `sys_role_menu` VALUES (1, 64);
INSERT INTO `sys_role_menu` VALUES (1, 71);
INSERT INTO `sys_role_menu` VALUES (1, 72);
INSERT INTO `sys_role_menu` VALUES (1, 73);
INSERT INTO `sys_role_menu` VALUES (1, 74);
INSERT INTO `sys_role_menu` VALUES (1, 100);
INSERT INTO `sys_role_menu` VALUES (1, 101);
INSERT INTO `sys_role_menu` VALUES (1, 102);
INSERT INTO `sys_role_menu` VALUES (1, 103);
INSERT INTO `sys_role_menu` VALUES (1, 104);
INSERT INTO `sys_role_menu` VALUES (1, 110);
INSERT INTO `sys_role_menu` VALUES (1, 111);
INSERT INTO `sys_role_menu` VALUES (1, 112);
INSERT INTO `sys_role_menu` VALUES (1, 113);
INSERT INTO `sys_role_menu` VALUES (1, 114);
INSERT INTO `sys_role_menu` VALUES (4, 71);
INSERT INTO `sys_role_menu` VALUES (14, 1);
INSERT INTO `sys_role_menu` VALUES (14, 2);
INSERT INTO `sys_role_menu` VALUES (14, 3);
INSERT INTO `sys_role_menu` VALUES (14, 4);
INSERT INTO `sys_role_menu` VALUES (14, 5);
INSERT INTO `sys_role_menu` VALUES (14, 6);
INSERT INTO `sys_role_menu` VALUES (14, 7);
INSERT INTO `sys_role_menu` VALUES (14, 8);
INSERT INTO `sys_role_menu` VALUES (14, 9);
INSERT INTO `sys_role_menu` VALUES (14, 10);
INSERT INTO `sys_role_menu` VALUES (14, 11);
INSERT INTO `sys_role_menu` VALUES (14, 12);
INSERT INTO `sys_role_menu` VALUES (14, 13);
INSERT INTO `sys_role_menu` VALUES (14, 14);
INSERT INTO `sys_role_menu` VALUES (14, 15);
INSERT INTO `sys_role_menu` VALUES (14, 21);
INSERT INTO `sys_role_menu` VALUES (14, 31);
INSERT INTO `sys_role_menu` VALUES (14, 41);
INSERT INTO `sys_role_menu` VALUES (14, 51);
INSERT INTO `sys_role_menu` VALUES (14, 61);
INSERT INTO `sys_role_menu` VALUES (14, 71);
COMMIT;

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键ID',
  `dept_id` int(11) DEFAULT NULL COMMENT '部门ID',
  `login_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '登录名',
  `user_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '用户姓名',
  `password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '密码',
  `status` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '状态',
  `type` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '账号类型',
  `mobile` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '手机',
  `phone` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '电话',
  `avatar` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '头像',
  `email` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '邮件',
  `salt` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT '随机盐',
  `memo` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL COMMENT '备注',
  `create_user_id` int(11) DEFAULT NULL COMMENT '创建人',
  `update_user_id` int(11) DEFAULT NULL COMMENT '修改人',
  `create_date` datetime DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_date` datetime DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  `del_flag` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'NOR' COMMENT 'NOR：正常， DEL：删除',
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `user_idx1_username` (`user_name`),
  UNIQUE KEY `user_idx2_phone` (`phone`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='用户表';

-- ----------------------------
-- Records of sys_user
-- ----------------------------
BEGIN;
INSERT INTO `sys_user` VALUES (1, 1, 'admin', '系统管理员', '$2a$10$BWOHklHKeck5USpx/BInIuoCJ8gPM8i4MWxOvTOi42kipxQU54xKS', 'VALID', NULL, NULL, '17034642111', NULL, NULL, NULL, NULL, NULL, NULL, '2018-12-13 21:23:40', '2018-12-13 23:26:53', 'NOR');
INSERT INTO `sys_user` VALUES (2, 1, 'test1', '测试', '$2a$10$BWOHklHKeck5USpx/BInIuoCJ8gPM8i4MWxOvTOi42kipxQU54xKS', 'VALID', NULL, NULL, '1', NULL, NULL, NULL, NULL, NULL, NULL, '2018-12-13 21:23:40', '2018-12-13 23:26:53', 'NOR');
COMMIT;

-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role` (
  `user_id` int(11) NOT NULL COMMENT '用户ID',
  `role_id` int(11) NOT NULL COMMENT '角色ID',
  PRIMARY KEY (`user_id`,`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户角色表';

-- ----------------------------
-- Records of sys_user_role
-- ----------------------------
BEGIN;
INSERT INTO `sys_user_role` VALUES (1, 1);
INSERT INTO `sys_user_role` VALUES (4, 14);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
